import React from "react";
import { View, Image, Text } from "@tarojs/components";
import Taro from "@tarojs/taro";
import DefaultImage from "../../../images/index/default_head.png";
import "./detail.scss";
import { AtAvatar, AtDivider } from "taro-ui";

const ArticleDetail = (props) => {
  const instance = Taro.getCurrentInstance();
  const routeParams = instance.router.params;
  console.log("routeParams:", routeParams);
  const { id } = routeParams;

  return (
    <View className="article-detail">
      <View className="header">
        <Image src={DefaultImage} className="header-img" />
      </View>
      <View className="title">【浙江安吉】余村打卡</View>
      <View className="user">
        <AtAvatar circle size="small" image={DefaultImage} className="avatar" />{" "}
        <Text className="username">超级管理员</Text>
      </View>
      <View className="location">
        <View className="position">浙江省湖州市安吉县天荒坪镇余村</View>
        <View className="name">现代理想乡村样板</View>
        <AtDivider />
      </View>
      <View className="content">文章内容</View>
      <AtDivider />
      <View className="footer">
        <Text>收藏 </Text>
        <Text> 客服</Text>
      </View>
    </View>
  );
};

export default ArticleDetail;

definePageConfig({
  navigationBarTitleText: "详情",
});
